<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/m_master">

<div layout:fragment="content">
    <div class="page-content">
        <form method="post" bottlecms-form-ajax="" id="form1" onsubmit="return check()">
            <div class="bcui-form">
                <div class="form-item" style="margin-top:0;">
                <textarea bottlecms-textarea name="content" id="content"
                          placeholder="请输入您的意见" style="height:150px"
                          class="content"></textarea></div>
                <div class="form-item">
                    <button type="submit" class="btn form-submit">提交</button>
                </div>
            </div>
        </form>
    </div>
    <div th:replace="layout/m_layout::systemJs"></div>
    <script>
        function check() {
            var content = $("#content").val();
            $("#form1").removeAttr("action");
            if (content.length < 5) {
                bottlecms.toast("反馈问题要大于5个字");
                return false;
            }
            $("#form1").attr("action", "/m/ajax/center/setup/feedback");
            return true;
        }

    </script>
</div>
</html>
